package edu.wit.acl.service;

import com.baomidou.mybatisplus.extension.service.IService;
import edu.wit.acl.entity.User;
import edu.wit.acl.entity.vo.UserCorpProjectVo;
import edu.wit.common.api.domain.SysUser;

import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author testjava
 * @since 2020-01-12
 */
public interface UserService extends IService<User> {

    // 从数据库中取出用户信息
    User selectByUsername(String username);

    User selectById(String userId);

    String selectCompanyIdByUsername(String username);

    void updateUserStatus(String id, Boolean isDeleted);

    //查询该总包方下的管理层用户数量
    int selectManagerCount(String adminPid);

    //昊广首页 查询租户数量
    Integer selectTenantNums();

    List<UserCorpProjectVo> selectUserCompanyByCompanyId(String companyId, String projectId);

    SysUser selectUserByUserName(String username);

    boolean usernameIsExist(String username);

    void updateLastLoginIp(String loginIp,Long userId);
}
